package com.example.oj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.oj.entity.Question;
import com.example.oj.entity.vo.QuestionVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author lenovo131
 * @description 针对表【question(题目)】的数据库操作Mapper
 * @createDate 2023-10-25 21:42:23
 * @Entity com.example.oj.model.entity.Question
 */
@Mapper
public interface QuestionMapper extends BaseMapper<Question> {

  List<Question> getQuestionPage(@Param("code") Long code,@Param("title") String title,@Param("tags") List<String> tags,@Param("difficulty") Integer difficulty
      ,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("userId") Long userId);


  List<Question> listPageCompetitionQuestion(@Param("id") Long id);

  void updateQuestionNum(Long id);

  void updateCompetitionId(@Param("questionStr")String questionStr,@Param("id") Long id);

  void removeCompetitionId(@Param("id") Long id);

  void updateQuestionIsQueried(@Param("id") Long id);
}




